package com.ysd.lis.controller.inv;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.inv.InvCert;
import com.ysd.lis.request.Params;
import com.ysd.lis.request.inv.CertDto;
import com.ysd.lis.service.inv.InvCertService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wanghuaixing
 * @since 2024-09-10
 */
@RestController
@RequestMapping("/inv/cert")
public class InvCertController extends BaseController {

    @Autowired
    private InvCertService invCertService;


    @ApiOperation("获取证书")
    @GetMapping("/findCertList")
    public Result findGermList(Params params) {
        return invCertService.findCertList(params);
    }
    @ApiOperation("获取证书")
    @GetMapping("/findInvCertList")
    public Result findInvCertList(Params params) {
        return invCertService.findInvCertList(params);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteCert")
    public Result batchDeleteCert(@RequestBody CertDto vo) {
        return invCertService.batchDeleteCert(vo);
    }

    @ApiOperation("添加证书")
    @PostMapping("/addCert")
    public Result addCert(@RequestBody InvCert invCert) {
        return invCertService.addCert(invCert);
    }

    @ApiOperation("修改证书字典")
    @PostMapping("/updateCert")
    public Result updateCert(@RequestBody InvCert invCert) {
        return invCertService.updateCert(invCert);
    }

}
